package rk.pisces.jpademo;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ActivityUserCount {

    private static long count;

    public static Long getCount() {
        return count;
    }

    public static void plus() {
        count += Math.round(Math.random()*100);
    }

    @Scheduled(cron = "* * * * * ?")
    public void addCount() {
        plus();
    }
}
